# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$

EAPI=3

JAVA_PKG_IUSE="doc source"

inherit base java-pkg-2

DESCRIPTION="Java interface to ICMP (ping)"
HOMEPAGE="http://www.opennms.org/wiki/Jicmp"
SRC_URI="mirror://sourceforge/opennms/JICMP/stable-1.0/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"


RDEPEND=">=virtual/jre-1.5"
DEPEND=">=virtual/jdk-1.5"

src_compile() {
	base_src_compile
	if use doc; then
		javadoc -d javadoc $(find org -name "*.java") || die "Javadoc failed"
	fi
}

src_install() {
	java-pkg_newjar *.jar
	java-pkg_doso .libs/*.so
	use source && java-pkg_dosrc org
	use doc && java-pkg_dojavadoc javadoc
}
